#pragma once

#ifndef LHJ_CORE_COMMON_HTTPHELPER_H__
#define LHJ_CORE_COMMON_HTTPHELPER_H__

#include <string>

namespace cores
{
    namespace common
    {

        using namespace std;
        /// @brief 重新架构通过Http
        class HttpHelper
        {
        protected:
            HttpHelper();

            virtual void sendWarmRequest(const string & code) = 0;
            virtual string getConfigFromApi(const string & stationCode) = 0;
            virtual bool compareFileVersion() = 0;
            virtual void downloadFile() = 0;

        public:
            virtual ~HttpHelper();

            static void SendWarmRequest(const string & code);
            static string GetConfigFromApi(const string& stationCode);
            static bool CompareFileVersion();
            static void DownloadFile();

        private:
            static HttpHelper * globalInstance;
        };
    }
}

#endif